<?php
/**
 * Created by PhpStorm.
 * User: gui
 * Date: 2019/2/11
 */

namespace App\Http\Controllers\ApiV1;

use App;
use App\Http\Controllers\Controller;

class DataFormatController extends Controller
{
    public function index($format = 'user', $number = 1)
    {
        $number = (int)$number;
        switch ($format) {
            case 'user':
                $data = factory (App\User::class, $number)->make ();
                break;
            default :
                $data = [];
                break;
        }

        return $data;
    }
}